package com.runshu.newsmartark.mvp.model;


import com.runshu.newsmartark.common.ConstantUrl;
import com.runshu.newsmartark.entity.UserInfoEntity;
import com.runshu.newsmartark.mvp.contract.RegisterAndRecognContract;
import com.runshu.newsmartark.network.netbean.HttpRequestParamsBuilder;
import com.runshu.newsmartark.network.netbean.ResponseBean;
import com.runshu.newsmartark.network.netinterface.BaseCallBack;

/**
 * Demo class
 *
 * @author yu
 * @date 2020/7/29
 * @decs：
 */

public class RegisterAndRecognModel extends BaseModel implements RegisterAndRecognContract.Model {
    @Override
    public void addUserFace(String usercode, String facecode, BaseCallBack baseCallBack) {
        HttpRequestParamsBuilder builder = new HttpRequestParamsBuilder();
        builder.putParams("usercode", usercode);
        builder.putParams("facecode", facecode);
        super.initDataFromServer(ConstantUrl.ADD_UserFace, builder.build(), ResponseBean.class, ResponseBean.RES_DATATYPE_BEAN, baseCallBack);

    }

    @Override
    public void verifyUserFace(String facecode, BaseCallBack baseCallBack) {
        HttpRequestParamsBuilder builder = new HttpRequestParamsBuilder();
        builder.putParams("facecode", facecode);
        super.initDataFromServer(ConstantUrl.VERIFY_UserFace, builder.build(), UserInfoEntity.class, ResponseBean.RES_DATATYPE_BEAN, baseCallBack);


    }
}